package com.zhou.org.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.zhou.org.dao.Enum;
import com.zhou.org.mapper.EnumMapper;
import com.zhou.org.service.EnumService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author lang.zhou
 * @since 2022-08-23
 */
@Service
public class EnumServiceImpl extends ServiceImpl<EnumMapper, Enum> implements EnumService {


    @Override
    public List<Enum> getByType(String type) {
        LambdaQueryWrapper<Enum> w = new LambdaQueryWrapper<>();
        w.eq(Enum::getEnumType,type);
        w.orderByAsc(Enum::getSort);
        return list(w);
    }

}
